﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace wd_35_tuple_v1
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// https://blog.csdn.net/weixin_39328209/article/details/106136153
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var ret = Divide(5, 2);
            MessageBox.Show(string.Format("{0} #### {1} ### {2}", ret.Item1, ret.Item2, Environment.Version));   // 元组
        }

        public static Tuple<int, int> Divide(int div1, int div2)
        {
            int result = div1 / div2;
            int remainder = div1 % div2;
            return Tuple.Create(result, remainder);
        }
    }
}
